package br.com.veterinariavillage.view.Cliente;

import javax.swing.*;

@SuppressWarnings("serial")
public class BotoesTabelaCliente extends JPanel {
    private JButton btCadastrarCliente;
    private JButton btCancelar;
    private JButton btOk;
    
    public BotoesTabelaCliente() {
        inicializarComponentes();
    }

    private void inicializarComponentes() {

        btCadastrarCliente = new JButton();
        btCancelar = new JButton();
        btOk = new JButton();

        btCadastrarCliente.setText("Cadastrar Animal");
        btCadastrarCliente.setToolTipText("Cadastra um novo cliente.");

        btCancelar.setText("Cancelar");
        btCancelar.setToolTipText("");

        btOk.setText("OK");
        btOk.setToolTipText("");

        GroupLayout layout = new GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btCadastrarCliente)
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                .addComponent(btCancelar, GroupLayout.PREFERRED_SIZE, 94, GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btOk, GroupLayout.PREFERRED_SIZE, 92, GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(btOk)
                    .addComponent(btCancelar)
                    .addComponent(btCadastrarCliente))
                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }
}

